import axios from './request'

type Login = {
  username: string
  password: string
}

import type { AxiosRequestConfig } from 'axios'

export const doLogin = (data: Login) => axios.post('/user/login', data)
export const getMenuList = () => axios.get('/system/menu/list')
export const getUserInfoByToken = () => axios.get('/user/get_user')
export const getUserInfoByID = (
  params: AxiosRequestConfig<{ user_id: string }>
) => axios.get('/user/get_user', params)
